.overlay {
	position: absolute;
	top: 0;
	left: 0;
	background: #fff;
	z-index: 5;
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	justify-content: center;
	align-items: center;
	opacity: 1;
	transition: opacity ease-in 0.25s;
}

.overlay.is-hidden {
	opacity: 0;
	pointer-events: none;
}

.wrapper {
	position: relative;
	width: 512px;
	max-width: 60vw;
	height: 4px;
	margin: 4px auto;
	border-radius: 10px;
	background: #e0e0e0;
}

.wrapper-definite .progress-bar.is-indefinite,
.wrapper-indefinite .progress-bar.is-definite {
	opacity: 0;
}

.wrapper-indefinite .progress-bar.is-indefinite,
.wrapper-definite .progress-bar.is-definite {
	opacity: 1;
}

.progress-bar {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	right: 100%;
	width: 0;
	background: #3858e9;
	border-radius: 2px;
	transition: opacity linear 0.2s, width ease-in 0.2s;
}

.progress-bar.is-indefinite {
	animation: indefinite-loading 2s linear infinite;
}

@keyframes indefinite-loading {
	0% {
		left: 0%;
		right: 100%;
		width: 0%;
	}
	10% {
		left: 0%;
		right: 75%;
		width: 25%;
	}
	90% {
		right: 0%;
		left: 75%;
		width: 25%;
	}
	100% {
		left: 100%;
		right: 0%;
		width: 0%;
	}
}

.caption {
	font-weight: 400;
	font-family: -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 1.1rem;
}

@media (prefers-color-scheme: dark) {
	.overlay {
		background: #1e1e1e;
		color: #fff;
	}

	.wrapper {
		background: #32363a;
	}
}
